Skip to content

Fix loading bar cleanup when tasks log messages - #8531

Merged
gonzaloriestra merged 1 commit into
mainfrom
gonzalo/fix-ink-log-cleanup
Sep 16, 2026
Merged

gonzaloriestra merged 1 commit into
mainfrom
gonzalo/fix-ink-log-cleanup

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Calling outputInfo() or outputWarn() during an Ink task writes directly to stderr, leaving the loading bar behind when the task finishes.

WHAT is this pull request doing?

Send stderr logs through Ink's existing console interception so messages remain visible and the task UI clears correctly. Add regression coverage for info/warning logs, task cleanup, and results staying on stdout.

How to manually test your changes?

pnpm exec nx build cli-kit

node --input-type=module -e '
import {renderSingleTask} from "./packages/cli-kit/dist/public/node/ui.js";
import {outputInfo, outputWarn, outputResult, TokenizedString} from "./packages/cli-kit/dist/public/node/output.js";
import {setTimeout as sleep} from "node:timers/promises";
await renderSingleTask({title: new TokenizedString("Preparing the result"), task: async () => {
  await sleep(1000);
  outputInfo("Prepared an item");
  outputWarn("Sample warning");
}});
outputResult("Done");
'
Before After
image image

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Sep 11, 2026
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/fix-ink-log-cleanup branch from 6274e50 to dddec36 Compare September 11, 2026 13:47
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 11, 2026 13:52
@gonzaloriestra
gonzaloriestra requested a review from a team as a code owner September 11, 2026 13:52

@amcaplan amcaplan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

gonzaloriestra commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Sep 16, 8:17 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 16, 8:18 AM UTC: @gonzaloriestra added this pull request to the GitHub merge queue with Graphite.

@gonzaloriestra
gonzaloriestra added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 43f92d0 Sep 16, 2026
30 checks passed
@gonzaloriestra
gonzaloriestra deleted the gonzalo/fix-ink-log-cleanup branch September 16, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants